class ExaminerController < ApplicationController

  def index
    @surveys = Survey.used_surveys(10,params[:page])
  
    respond_to do |wants|
      wants.html # index.html.erb
      wants.json { render :json => @surveys.to_json}
    end
  end
  
  def surveys
    @surveys = Survey.used_surveys(7,params[:page])
  
    respond_to do |wants|
      wants.html 
      wants.json { render :json => @surveys.to_json}
    end
  end
  

  def test
    @survey = Survey.find(params[:id])
  end

  def report
    @survey = Survey.find(params[:id])
    if @survey.type_is_count 
print '====================count test================='
      @report = @survey.c_report(params)
    else
      @report = @survey.t_report(params)
    end
  end
end
